Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the eventsource library #239

Merged
merged 15 commits into from
Mar 6, 2019
Merged

Replace the eventsource library #239

merged 15 commits into from
Mar 6, 2019

Conversation

morleyzhi
Copy link
Contributor

@morleyzhi morleyzhi commented Mar 1, 2019

Only load eventsource, which uses node built-ins httpandhttps`, in Node. Fixes an issue with Angular 6. See stellar/js-stellar-base#128.

'./node_modules/event-source-polyfill/src/eventsource.min.js'
)
)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff is tricky to read, it looks like this is the only change? 👍 on removing polyfill

@@ -1,14 +1,13 @@
import forEach from 'lodash/forEach';
import URI from 'urijs';
import URITemplate from 'urijs/src/URITemplate';
import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK it's generally best practice to ask consumers to provide polyfills for web standards rather than pulling them in as dependencies. That would be a breaking change so I don't think we should make it willy-nilly, but at some point it might be better to rely on window.EventSource and just provide a warning if it's missing.

@morleyzhi
Copy link
Contributor Author

The polyfill doesn't appear to work with the current codebase in the same way that the old one did. Looking into it.

Copy link
Contributor

@bartekn bartekn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but please remove all fucks from the code.

@morleyzhi morleyzhi merged commit b1e9314 into stellar:master Mar 6, 2019
@morleyzhi morleyzhi deleted the mz-builtins branch March 7, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants